#include <stdio.h>

void right_print (int num)
{

    // 右移操作符 算术右移

    printf ("右移方法打印\n") ;

    printf ("奇数位打印: ") ;

    for (int i = 31 ; i >= 1 ; i -= 2)
    {

       printf ("%d" , (num >> i) & 1) ;

    }

    printf ("\n") ;

    printf ("偶数位打印: ") ;

    for (int i = 30 ; i >= 0 ; i -= 2)
    {

        printf ("%d" , (num >> i) & 1) ;

    }

    printf ("\n\n") ;

}

void left_print (int num)
{

    // 左移操作符

    printf ("左移方法打印\n") ;

    printf ("奇数位: ") ;

	for (int i = 31; i >= 1; i -= 2) 
    {

		if (num & (1 << i)) 
        {

			printf ("%d",1) ;

		}

		else 
        {

			printf ("%d", 0) ;

		}

	}

	printf ("\n") ;

	printf ("偶数位: ") ;

	for (int i = 30; i >= 0; i -= 2) 
    {

		if (num & (1 << i)) 
        {

			printf ("%d", 1) ;

		}

		else 
        {

			printf ("%d", 0) ;

		}

	}
    

}

int main ()
{

    int num = 0 ; 

    while (scanf ("%d" , &num) != EOF)
    {

        right_print (num) ; 

        left_print (num) ;
        
    }

    return 0 ;

}